home *** CD-ROM | disk | FTP | other *** search
- Path: news.th-darmstadt.de!news
- From: enno@inferenzsysteme.informatik.th-darmstadt.de (Enno Sandner)
- Newsgroups: comp.lang.c++
- Subject: Re: Circular Usage (forward declaration?)
- Date: 16 Apr 1996 20:38:15 +0200
- Organization: Fachbereich Informatik, TH Darmstadt
- Sender: enno@kitz.inferenzsysteme.informatik.th-darmstadt.de
- Message-ID: <ltu3ykovzc.fsf@kitz.inferenzsysteme.informatik.th-darmstadt.de>
- References: <MRW.96Apr16184800@tobago.siemens.ch>
- NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
- In-reply-to: mrw@tobago.siemens.ch's message of 16 Apr 1996 16:48:00 GMT
- X-Newsreader: Gnus v5.1
-
- In article <MRW.96Apr16184800@tobago.siemens.ch> mrw@tobago.siemens.ch (Waeckerlin Marc) writes:
-
- How do you realize this in C++:
- (the whole problem is much more complex, but it can be reduced to that)
-
- class A
- {
- B x;
- };
-
- class B
- {
- A x;
- };
-
- There's no way -- use pointers or references instead, i.e. dynamicly
- allocate the appropriate instance of class 'A' or class 'B'.
-
- Enno
-